1. Field of the Invention
This invention is related to the field of virtual machines and, more particularly, to balancing the load of virtual machines among the computer systems in a cluster.
2. Description of the Related Art
Virtual machines have a variety of uses in computer systems. For example, virtual machines may be used to provide several users with access to the computer system concurrently. Each user may execute applications in a different virtual machine, and the virtual machines may be scheduled for execution on the computer system hardware. Virtual machines can also be used during software development to test the software on various hardware configurations (e.g. each hardware configuration is represented by a differently configured virtual machine). Virtual machines may be used to consolidate tasks that were previously running on separate computer systems by assigning each task to a virtual machine and running the virtual machines on fewer computer systems. Virtual machines may also be used to provide high availability. If a given computer system fails, tasks that were executing in virtual machines on that computer system may be transferred (“failed over”) to similar virtual machines on other computer systems. Moreover, the entire virtual machine may be failed over to another computer system. There may be many other uses for virtual machines as well.
Typically, virtual machines are manually assigned to computer systems by an administrator, based on an assumed load that each virtual machine will generate or based on measured loads under various circumstances. However, estimates of the load may be incorrect or the load may dynamically change during use, and thus less than optimal usage of the computer systems may result. In some cases, cluster-level performance monitoring tools may be used to monitor load and inform the administrator when load imbalances are detected. Complicated policy settings may be used to help balance the load.
Some operating systems have implemented process migration schemes to migrate processes being handled by the operating system. For example, Open MOSIX may be used with the Linux operating system to perform process migration. Typically, the process migration schemes are complicated by locating points in the process at which migration may occur. Additionally, oftentimes a process may share a memory segment or segments with other processes. Identifying which processes share memory segments, and which memory segments are shared, may be difficult. Accordingly, open MOSIX does not permit the migration of processes that share a memory segment. Newer versions of open MOSIX may permit some migration of processes that share a single memory segment, by migrating the processes and the shared memory segment together to a single computer system.
Additionally, open MOSIX maintains a “stub” process for a migrated process on the computer system on which the migrated process was launched (the “home node”). The stub process is used by the migrated process for all I/O activity (since the I/O devices accessed by the process may be part of the home node or accessible to the home node but not to the computer system to which the process migrated). Additionally, the stub is used when the process requests the time of day, since the time of day facilities on the home node and the computer system to which the process migrated are not perfectly synchronized. Thus, once a process migrates, it actually has a presence on two computer systems. If either computer system goes down, the process may be lost, which lowers the availability of the process (in the “high availability” sense discussed with regard to enterprise computing systems).